package com.cdtye.shuoh.mapper.device;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cdtye.shuoh.domain.device.entity.Device;
import com.cdtye.shuoh.domain.device.vo.DeviceVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;


/**
 * 边设备档案信息表 Mapper 接口
 * @author 
 * @date 2022-12-21
 */
@Repository
public interface DeviceMapper extends BaseMapper<Device> {

    List<Device> selectList(@Param("vo") DeviceVo vo);

    Device getById(@Param("id") String id);

    Device findOneByClientIdOrDeviceIdentification(@Param("clientId") String clientId, @Param("deviceIdentification") String deviceIdentification);

    Device findOneByDeviceIdentification(@Param("deviceIdentification") String deviceIdentification);

    Device findOneByClientId(@Param("clientId") String clientId);

    IPage<Device> pageList(Page page, @Param("vo")DeviceVo vo);

    int updateDevice(@Param("vo")DeviceVo vo);

    int deleteById(@Param("id") String id);

    Map<String,Object> connectStatusStatistic();
}
